//package com.xiaoyu.studyworkspace.task;
//
//import com.xiaoyu.studyworkspace.common.util.SpringContextUtils;
//import com.xiaoyu.studyworkspace.common.websocketclient.RecordSocketClient;
//import lombok.Data;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//@Component
//@Slf4j
//public class AutoEnableTask {
//
//    private RecordSocketClient recordSocketClient;
//
//    @Scheduled(cron = "0/5 * * * * ?")
//    public void enableRecordJobHandler() {
//        //定时检测是否已经启动
//        if (RecordSocketClient.startFlag()) {
//            //已经启动了就跳过
//            return;
//        }
//        log.info("生成一个实例");
//        RecordSocketClient bean = SpringContextUtils.getContext().getBean(RecordSocketClient.class);
//        recordSocketClient = bean;
//        recordSocketClient.connect();
//    }
//}
